local ads__quanyou = fk.CreateSkill {
  name = "ads__quanyou",
}

ads__quanyou:addEffect("viewas", {
  anim_type = "offensive",
  pattern = "slash",
  card_filter = Util.FalseFunc,
  view_as = function(self, player, cards)
    if #cards ~= 0 then return end
    local c = Fk:cloneCard("slash")
    c.skillName = ads__quanyou.name
    return c
  end,
  before_use = function(self, player, use)
    local room = player.room
    if use.tos then
      room:doIndicate(player.id, table.map(use.tos, Util.IdMapper))
    end

    for _, p in ipairs(room:getOtherPlayers(player)) do
      if p.kingdom ~= "shu" then
        local respond = room:askToResponse(p, {
          skill_name = ads__quanyou.name,
          pattern = "slash",
          prompt = "#ads__quanyou-ask:"..player.id,
          cancelable = true,
        })
        if respond then
          respond.skipDrop = true
          room:responseCard(respond)

          use.card = respond.card
          return
        end
      end
    end

    room:setPlayerMark(player, "ads__quanyou_failed-phase", 1)
    return ads__quanyou.name
  end,
  enabled_at_play = function(self, player)
    return player:getMark("ads__quanyou_failed-phase") == 0 and
      table.find(Fk:currentRoom().alive_players, function(p)
        return p.kingdom ~= "shu" and p ~= player
      end)
  end,
  enabled_at_response = function(self, player)
    return table.find(Fk:currentRoom().alive_players, function(p)
      return p.kingdom ~= "shu" and p ~= player
    end)
  end,
})

ads__quanyou:addAI({
  think_skill_invoke = Util.TrueFunc,
})



Fk:loadTranslationTable{
  ["$ads__quanyou1"] = "蜀将何在？",
  ["$ads__quanyou2"] = "尔等敢应战否？",
  ["ads__quanyou"] = "劝诱",
  [":ads__quanyou"] = "当你需要使用或打出【杀】时，你可以令其他非蜀势力角色选择是否打出一张【杀】（视为由你使用或打出）。",
  ["#ads__quanyou-ask"] = "劝诱：你可打出一张杀，视为 %src 使用或打出",
}


return ads__quanyou
